package com.ftg.learn.chapter02;

/**
 * @author kangjx
 * @createTime 2022/6/29
 */
public class Student implements Comparable<Student> {

    private int age;
    private int sno;
    private String name;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSno() {
        return sno;
    }

    public void setSno(int sno) {
        this.sno = sno;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int compareTo(Student o) {
        return this.getAge() - o.getAge();
    }
}
